//
//  ReplyComment.m
//  奇阅
//
//  Created by 奇阅科技 on 14-11-12.
//  Copyright (c) 2014年 奇阅科技. All rights reserved.
//

#import "ReplyComment.h"
#import "Config.h"
@implementation ReplyComment
+(NSString *)getTableName
{
    return @"ReplyComment";
}
+(ReplyComment *)getFromDict:(NSDictionary *)dict withBook:(Book *)book{
    ReplyComment *comment = [ReplyComment new];
    comment.uid = [dict objectForKey:@"uid"];
    comment.commentid = [dict objectForKey:@"reply_comments_id"];
    comment.commentsid = [dict objectForKey:@"id"];
//    comment.book = book;
    comment.articleid = [dict objectForKey:@"articleid"];
    comment.time = [dict objectForKey:@"time"];
    comment.nickName = [dict objectForKey:@"aliases"];
    comment.headimg = [dict objectForKey:@"headimg"];
    comment.contents = [dict objectForKey:@"contents"];
    NSString *reply_theme_id = [dict objectForKey:@"reply_theme_id"];
    if (reply_theme_id.length>0&&![reply_theme_id isEqualToString:@"0"]) {
        comment.replyNickName = [dict objectForKey:@"whoreply"];
    }
    return comment;
}
//更新 数据
-(void)upDateNew:(ReplyComment *)newComment{
//    self.point_like = newComment.point_like;
//    self.reply_num = newComment.reply_num;
    self.headimg = newComment.headimg;
    self.nickName = newComment.nickName;
    self.replyNickName = newComment.replyNickName;
}
@end
